# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Gabriele Musco <gabmus@disroot.org>

_pkgname=listparser
pkgname=python-listparser
pkgver=0.19
pkgrel=3
pkgdesc='Python library that parses OPML, RDF+FOAF, and the iGoogle subscription lists'
arch=('any')
url='https://github.com/kurtmckee/listparser'
license=('GPL3')
depends=('python-requests')
makedepends=('python-build' 'python-installer' 'python-poetry-core')
checkdepends=('python-pytest')
source=("https://github.com/kurtmckee/$_pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('0a64a286ae5b65c565174fb4fd7b7944aa8bfc7754e0328603af9ebad6b03945')

build() {
  cd $_pkgname-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd $_pkgname-$pkgver
  PYTHONPATH="$PWD"/src \
  pytest -v
}

package() {
  cd $_pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
